package com.hunt.service.impl;

import com.alibaba.fastjson.JSON;
import com.hunt.dao.RehabilitationMapper;
import com.hunt.model.app.Rehabilitation;

import com.hunt.service.RehabilitationService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;

public class RehabilitationServiceImpl implements RehabilitationService {
    @Autowired
    private RehabilitationMapper rehabilitationMapper;
    @Override
    public int insertdata(String data) {
        Rehabilitation rehabilitation=new Rehabilitation();
        Rehabilitation rehabilitation1=new Rehabilitation();
        List li=new ArrayList();
        li.add(rehabilitation);
        li.add(rehabilitation1);
        List<Rehabilitation> list= JSON.parseArray(JSON.toJSONString(li), Rehabilitation.class);
        rehabilitationMapper.insertrehabilitation(list);
        return 0;
    }
}
